<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>订单详情</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">
  <link rel="stylesheet"  th:href="@{/wxui/lib/weui.min.css}">
  <link rel="stylesheet"  th:href="@{/wxui/css/jquery-weui.css}">
  <link rel="stylesheet"  th:href="@{/wxui/css/style.css}">
</head>
<body ontouchstart>
<!--主体-->
<header class="wy-header">
  <div class="wy-header-icon-back"><span></span></div>
  <div class="wy-header-title">订单详情</div>
</header>
<div class="weui-content">
  <div class="wy-media-box weui-media-box_text address-select">
    <div class="weui-media-box_appmsg">
      <div class="weui-media-box__hd proinfo-txt-l" style="width:35px;"><span class="promotion-label-tit"><img th:src="@{/wxui/images/maps.png}" /></span></div>
      <div class="weui-media-box__bd">
        <a th:href="${'/orderInfo/frontStage/selectOrderAddress?orderId='+order.id}" class="weui-cell_access">
          <h4 class="address-name"><span th:text="${order.userName}"></span><span th:text="${order.phone}"></span></h4>
          <div class="address-txt" th:text="${order.addressInfo}"></div>
        </a>
      </div>
      <div class="weui-media-box__hd proinfo-txt-l" style="width:16px;"><div class="weui-cell_access"><span class="weui-cell__ft"></span></div></div>
    </div>
  </div>
  <div class="wy-media-box weui-media-box_text">
    <div class="weui-media-box__bd">
      <span th:each="item,itemStat:${orderDetils}">
     <div class="weui-media-box_appmsg ord-pro-list">
        <div class="weui-media-box__hd"><a th:href="${'/goods/front/detail/'+item.goodsId}"><img class="weui-media-box__thumb" th:src="${item.goodsImg}" alt=""></a></div>
        <div class="weui-media-box__bd">
          <h1 class="weui-media-box__desc"><a href="pro_info.html" class="ord-pro-link" th:text="${item.title}"></a></h1>
          <p class="weui-media-box__desc" th:text="${'型号：'+item.specificationsInfo}"></p>
          <div class="clear mg-t-10">
            <div class="wy-pro-pri fl">¥<em class="num font-15" th:text="${item.price}"></em></div>
            <div class="pro-amount fr"><span class="font-13" >数量×<em class="name" th:text="${item.num}"></em></span></div>
          </div>
        </div>
      </div>
    </span>
    </div>
  </div>
  <div class="weui-panel">
    <div class="weui-panel__bd">
      <div class="weui-media-box weui-media-box_small-appmsg">
        <div class="weui-cells">
          <div class="weui-cell weui-cell_access" href="javascript:;">
            <div class="weui-cell__bd weui-cell_primary">
              <p class="font-14"><span class="mg-r-10">运费</span><span class="fr txt-color-red">￥<em class="num" th:text="${order.freight}"></em></span></p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="wy-media-box weui-media-box_text">
    <div class="mg10-0 t-c">总金额：<span class="wy-pro-pri mg-tb-5">¥<em class="num font-20" th:text="${order.money}"></em></span></div>

   <div>
   	<div class="weui-cell weui-cell_access">
   	    	<div class="weui-cell__bd"><img style="width: 40px;height: 40px;" th:src="@{/wxui/images/wxPay.png}" /><span style="margin-left: 18px;">微信支付</span></div>
          <div class="weui-media-box__hd check-w weui-cells_checkbox">
          <label class="weui-check__label" for="cart-pto3">
            <div class="weui-cell__hd "><input type="radio" data-pay="0" class="weui-check pay" name="cartpro" id="cart-pto3"><i class="weui-icon-checked"></i></div>
          </label>
        </div>
   	</div>

   	<div class="weui-cell weui-cell_access">
   	    	<div class="weui-cell__bd"><img style="width: 40px;height: 40px;" th:src="@{/wxui/images/zfbPay.png}"  /><span style="margin-left: 18px;">支付宝支付</span></div>
          <div class="weui-media-box__hd check-w weui-cells_checkbox" >
          <label class="weui-check__label" for="cart-pto4">
            <div class="weui-cell__hd "><input type="radio" data-pay="1"  class="weui-check pay" name="cartpro" id="cart-pto4"><i class="weui-icon-checked"></i></div>
          </label>
        </div>
   	</div>
  </div>
   <div class="mg10-0"><a id="payBtn" href="javascript:;" class="weui-btn weui-btn_primary" style="background-color: #EA869A;">确认支付</a></div>
</div>
  <script th:src="@{/wxui/lib/jquery-2.1.4.js}"></script>
  <script th:src="@{/wxui/lib/fastclick.js}"></script>
  <script type="text/javascript" th:src="@{/wxui/js/jquery.Spinner.js}"></script>
<script th:inline="javascript" type="text/javascript">
  $(function() {
    FastClick.attach(document.body);
     $(".wy-header-icon-back").click(function(){
         location.href='/orderInfo/frontStage/lookOrders?state='
     });

     var sum = [[${order.money}]];
     var orderId = [[${order.id}]];

    $("#payBtn").click(function(){
    	if($(".pay:checked").length<=0){$.toast("请选择支付方式", "text");return;}
    	var val=$(".pay:checked").data("pay");
    	if(val){
        location.href='/orderInfo/frontStage/goPayForZfbPage?orderId='+orderId+'&sum='+sum
    	}else{
    	location.href='/orderInfo/frontStage/goPayForWxPage?orderId='+orderId+'&sum='+sum
    	}
    });

  });
</script>
<script type="text/javascript">
$(function(){
	$(".Spinner").Spinner({value:1, len:3, max:999});
});
</script>
  <script th:src="@{/wxui/js/jquery-weui.js}"></script>


</body>
</html>
